home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / src / exampleCode / opengl / GLUT / lib / glut / Makefile.sgi < prev    next >
Encoding:
Makefile  |  1996-11-11  |  5.0 KB  |  198 lines

  1. #! smake
  2. #
  3. # Copyright (c) Mark J. Kilgard, 1995.
  4. #
  5. include $(ROOT)/usr/include/make/commondefs
  6.  
  7. # NOTE:  In my GLUT development tree, many of the C source files for
  8. # GLUT are generated.  For this reason, "make full_clobber" will remove
  9. # these generated C files, while "make clobber" will not.
  10.  
  11. TOP = ../..
  12.  
  13. TARGETS = libglut.a
  14.  
  15. LN = ln -s
  16. MV = mv
  17. RM = -rm -rf
  18.  
  19. ANN_HDRS = glutint.ah
  20. ANN_GENHDRS = $(ANN_HDRS:.ah=.h)
  21. HDRS = glutint.h glutstroke.h layerutil.h glutbitmap.h
  22.  
  23. ANN_SRCS = \
  24.     glut_cindex.ac \
  25.     glut_cursor.ac \
  26.     glut_dials.ac \
  27.     glut_event.ac \
  28.     glut_fullscrn.ac \
  29.     glut_init.ac \
  30.     glut_input.ac \
  31.     glut_menu.ac \
  32.     glut_modifier.ac \
  33.     glut_overlay.ac \
  34.     glut_shapes.ac \
  35.     glut_space.ac \
  36.     glut_tablet.ac \
  37.     glut_win.ac \
  38.     glut_winmisc.ac \
  39.  
  40. ANN_GENSRCS = $(ANN_SRCS:.ac=.c)
  41.  
  42. SRCS = \
  43.     glut_bitmap.c \
  44.     glut_bwidth.c \
  45.     glut_cindex.c \
  46.     glut_cursor.c \
  47.     glut_dials.c \
  48.     glut_event.c \
  49.     glut_ext.c \
  50.     glut_fullscrn.c \
  51.     glut_get.c \
  52.     glut_init.c \
  53.     glut_input.c \
  54.     glut_menu.c \
  55.     glut_modifier.c \
  56.     glut_overlay.c \
  57.     glut_shapes.c \
  58.     glut_space.c \
  59.     glut_stroke.c \
  60.     glut_swidth.c \
  61.     glut_tablet.c \
  62.     glut_teapot.c \
  63.     glut_util.c \
  64.     glut_win.c \
  65.     glut_winmisc.c \
  66.     layerutil.c \
  67.  
  68. SRCSSEMIGENS = \
  69.     glut_8x13.c \
  70.     glut_9x15.c \
  71.     glut_hel10.c \
  72.     glut_hel12.c \
  73.     glut_hel18.c \
  74.     glut_tr10.c \
  75.     glut_tr24.c \
  76.  
  77. SRCGENS = glut_roman.c glut_mroman.c
  78. OBJS = $(SRCS:.c=.o) $(SRCSSEMIGENS:.c=.o) $(SRCGENS:.c=.o)
  79. OTHERGENS = y.tab.c y.tab.h strokegen.c strokegen.h strokelex.c
  80. OTHERSRCS = strokegen.y strokelex.l stroke.h
  81. FONTS = Roman.stroke MonoRoman.stroke
  82.  
  83. LCOPTS = -I$(TOP) -fullwarn -wlint,-f -woff 813,852,827,826
  84. LDIRT = *~ $(SRCGENS) $(OTHERGENS) strokegen *.bak hardcopy glutsrc.ps capturexfont *.pure cannotate
  85.  
  86. default: $(TARGETS)
  87.  
  88. .SUFFIXES : .ah .ac
  89.  
  90. CANNOTATE = cannotate
  91.  
  92. $(CANNOTATE) : cannotate.c
  93.     $(CC) $(CFLAGS) -o $@ cannotate.c
  94.  
  95. sinclude ObjectType.mk
  96.  
  97. $(ANN_GENSRCS) $(ANN_GENHDRS) : $(CANNOTATE)
  98. $(SRCS) $(ANN_GENSRCS) : $(ANN_GENHDRS)
  99. $(SRCS) $(ANN_GENSRCS) : $(HDRS)
  100.  
  101. $(X).ac.c :
  102.     $(RM) $(.TARGET)
  103.     ./cannotate -c $(.IMPSRC)
  104. $(X).ah.h :
  105.     $(RM) $(.TARGET)
  106.     ./cannotate -c $(.IMPSRC)
  107.  
  108. libglut.a : $(OBJS)
  109.     $(RM) $@
  110.     $(AR) crl $@ $(OBJS)
  111.  
  112. .ORDER : strokegen.h strokegen.c
  113.  
  114. strokegen.h strokegen.c : strokegen.y
  115.     $(YACC) -d strokegen.y
  116.     $(MV) y.tab.c strokegen.c
  117.     $(MV) y.tab.h strokegen.h
  118.  
  119. # avoid warnings when compiling lex generated code
  120. strokegen.o : strokegen.c
  121.     $(CC) -g -c -MDupdate Makedepend strokegen.c
  122.  
  123. strokelex.c : strokelex.l
  124.     $(LEX) strokelex.l
  125.     $(MV) lex.yy.c strokelex.c
  126.  
  127. # avoid warnings when compiling lex generated code
  128. strokelex.o : strokelex.c
  129.     $(CC) -c -MDupdate Makedepend strokelex.c
  130.  
  131. strokegen : strokegen.o strokelex.o
  132.     $(CC) -o $@ $(CFLAGS) strokegen.o strokelex.o -ll
  133.  
  134. capturexfont : capturexfont.o
  135.     $(CC) -o $@ $(CFLAGS) capturexfont.o -lX11
  136.  
  137. $(X)glut_roman.c : Roman.stroke strokegen
  138.     ./strokegen -s glutStrokeRoman < Roman.stroke > $@
  139.  
  140. $(X)glut_mroman.c : MonoRoman.stroke strokegen
  141.     ./strokegen -s glutStrokeMonoRoman < MonoRoman.stroke > $@
  142.  
  143. glutsrc.ps : $(SRCS)
  144.     $(RM) hardcopy
  145.     mkdir -p hardcopy
  146.     for i in $(SRCS) ;\
  147.     do \
  148.       grep -v CENTRY $$i | grep -v INDENT- > hardcopy/$$i; \
  149.     done
  150.     cd hardcopy ; enscript -p ../$@ -G -2r `echo $(SRCS) | fmt -1 | sort`
  151.     $(RM) hardcopy
  152.  
  153. # The bitmap files can be generated using capturexfont, but because
  154. # they require a connection to an X server and potentially different
  155. # X servers have different fonts, these generated files are part
  156. # of the GLUT distribution.
  157.  
  158. 9_BY_15 = -misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1
  159. 8_BY_13 = -misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1
  160. TR10 = -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1
  161. TR24 = -adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1
  162. HEL10 = -adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1
  163. HEL12 = -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1
  164. HEL18 = -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1
  165.  
  166. semigens : capturexfont
  167.     ./capturexfont $(9_BY_15) glutBitmap9By15 > glut_9x15.c.gen
  168.     ./capturexfont $(8_BY_13) glutBitmap8By13 > glut_8x13.c.gen
  169.     ./capturexfont $(TR10) glutBitmapTimesRoman10 > glut_tr10.c.gen
  170.     ./capturexfont $(TR24) glutBitmapTimesRoman24 > glut_tr24.c.gen
  171.     ./capturexfont $(HEL10) glutBitmapHelvetica10 > glut_hel10.c.gen
  172.     ./capturexfont $(HEL12) glutBitmapHelvetica12 > glut_hel12.c.gen
  173.     ./capturexfont $(HEL18) glutBitmapHelvetica18 > glut_hel18.c.gen
  174.  
  175. # unused test rule for test building 16-bit font
  176. JIS = -jis-fixed-medium-r-normal--24-230-75-75-c-240-jisx0208.1983-0
  177. glut_jis.c : 
  178.     ./capturexfont $(JIS) glutBitmapJis > $@
  179.  
  180. sources: $(SRCGENS) $(SRCS)
  181.  
  182. # delete everything but source generated C files
  183. special_clobber: rmtargets
  184.     -rm -rf *~ $(OTHERGENS) strokegen *.bak hardcopy glutsrc.ps capturexfont *.pure *.o Makedepend cannotate
  185.  
  186. true_clobber: clobber
  187.     $(RM) $(ANN_GENSRCS) $(ANN_GENHDRS)
  188.  
  189. ./glut.h : glut.h
  190. ./glutint.h : glutint.h
  191. ./glutstroke.h : glutstroke.h
  192. ./strokegen.h : strokegen.h
  193. ./stroke.h : stroke.h
  194. ./layerutil.h : layerutil.h
  195. strokelex.o: strokelex.c strokegen.h
  196.  
  197. include $(COMMONRULES)
  198.